home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / amos / amoslist.lzh / AMOSLIST / 000369_amos-request@svcs1.digex.net_Wed Sep 27 17:51:11 1995.msg < prev    next >
Internet Message Format  |  1995-10-02  |  4KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id RAA14465;  for <mcox@access.digex.net> ; Wed, 27 Sep 1995 17:51:09 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id OAA05281 for amos-out; Wed, 27 Sep 1995 14:19:28 -0400
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id OAA05278 for <amos-list@svcs1.digex.net>; Wed, 27 Sep 1995 14:19:27 -0400
  4. Received: from red.paston.co.uk (red.paston.co.uk [194.129.188.3]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id OAA18127;  for <amos-list@access.digex.net> ; Wed, 27 Sep 1995 14:19:20 -0400
  5. Received: from bwyatt.paston.co.uk by red.paston.co.uk (5.x/SMI-SVR4)
  6.     id AB03125; Wed, 27 Sep 1995 19:11:58 +0100
  7. Received: by paston.co.uk.uucp (V1.16/Amiga)
  8.     id AA001zd; Wed, 27 Sep 95 23:10:56 GMT
  9. Date: Wed, 27 Sep 95 23:10:56 GMT
  10. Message-Id: <9509272310.AA001zc@paston.co.uk.uucp>
  11. In-Reply-To:  <9509271355.aa19290@agora.stm.it>
  12.              (from M.Berionne@agora.stm.it)
  13.              (on Wed, 27 Sep 95 13:52:33)
  14. Lines: 68
  15. X-Mailer: ADMail 1.5 Copyright 1995 S.T.Brown
  16. From: bwyatt@paston.co.uk (Ben Wyatt)
  17. To: amos-list@access.digex.net
  18. Subject: Re: Help me!!
  19. Status: RO
  20. X-Status: 
  21.  
  22. Greetings M.Berionne@agora.stm.it, you wrote some text on the subject
  23. Help me!!, and now I'm going to answer it.
  24.  
  25. M> PH> > M> Finally, it must be fast enough, even if not just like the
  26. M> PH> > Circle command
  27. M> PH> > M> (or Fcircle by Turbo extension!).
  28. M> 
  29. M> Unluckly, Turbo extension (F Draw) doesn't work on double buffered screens.
  30. M> To display the line you must enter: Screen Swap, and I can't do it in my
  31. M> program!
  32.  
  33. If you're working on double buffered screens, draw it first on a single
  34. buffered one and copy it over. It should be much faster...
  35.  
  36. M> PH> If you want speed you should put Sin & Cos into arrays. Floating point
  37. M> PH> calculations are really sssslllooooowwwwww.....
  38. M> PH>
  39. M> PH> Example:
  40. M> PH>
  41. M> PH> dim si(360),co(360)
  42. M> PH> for t=0 to 360:si(t)=sin(t)*256:co(t)=cos(t)*256:next
  43. M> 
  44. M>  > I usually (virtually always) do
  45. M> 
  46. M> I tried more that once: it's INCREDIBLE but the functions are as fast as
  47. M> 
  48. M> the
  49. M> arrays (or as slow as...!) at least in the uncompiled version. do the
  50. M> arrays
  51. M> improve in the compiled version more than the functions??
  52.  
  53. You *must* use a multiple which is a power of 2 so the AMOS Pro compiler
  54. optimises it. If you have the original compiler, there probably won't
  55. be any difference between that and the sin/cos functions.
  56.  
  57. M> PH> and the draw part should be:
  58. M> PH> Draw To X+(SI(N)*R)/256,Y-(CO(N)*R)/256
  59. M> PH>
  60. M> PH> the /256 is done with bitshifting so it don't take much of time,
  61. M> PH> at least when compiled. Btw. isn't AMCAF's Turbo draw much faster?
  62. M> PH> If you have AMCAF (or Turbo extension) use it instead of amos!
  63. M> 
  64. M> Sorry, but I have alreasy said the I can't use Turbo. What about AmCaf??
  65. M> Do you know a way to solve the problem??
  66.  
  67. This proc only uses AMCAF...
  68.  
  69. M>  > So, the revised version...
  70. M>  > Procedure _PART_OF_CIRCLE[R,A,B,X,Y,STP]
  71. M>  > Gr Locate X+QSin(A,R),Y-QCos(B,R/2)
  72. M>  > For N=A+STP To A+B Step STP
  73. M>  > Turbo Draw To X+QSin(N,R),Y-QCos(N,R/2)
  74. M>  > Next N
  75. M>  > End Proc
  76. M> 
  77. M> Ehi, there an ERROR!! In the first line, it must NOT be ...,Y-QCos(B,R/2)
  78. M> but must be ...,Y-QCos(A,R/2)
  79. M>                        -
  80. M> 
  81. M> It was present even in the other version of this proc: check them!!
  82.  
  83. Sorry! A and B look very similar on my interlace screen! You're right, it
  84. should be an "A".
  85.  
  86. Bye  _________________________________
  87.     /                                 \
  88.     > Ben Wyatt - bwyatt@paston.co.uk <
  89.     \_________________________________/ ï¿½1995 Very Interesting Signatures